import request from '@/utils/request'

// 获取章节和课时
export const getAllSpaces = () => {
    return request({
        method: 'GET',
        url: '/front/ad/space/getAllSpaces',
    })
}

// 新增或更新章节
export const getSpaceById = id => {
    return request({
        method: 'GET',
        url: '/front/ad/space/getSpaceById',
        params: {
            id
        }
    })
}

export const saveOrUpdate = data => {
    return request({
        method: 'POST',
        url: '/front/ad/space/saveOrUpdate',
        data
    })
}


